import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import { AppController } from './app.controller'
import { AppService } from './app.service'
import { GoodsModule } from './goods/goods.module'

@Module({
	imports: [
		MongooseModule.forRoot('mongodb://127.0.0.1:27017/goods', {
			useNewUrlParser: true, 
    		useUnifiedTopology: true,
    		useCreateIndex: true,
    		useFindAndModify: false
		}),
		GoodsModule
	],
	controllers: [AppController],
	providers: [AppService],
})
export class AppModule {}
